package com.usian.user.feign;

import com.usian.common.pojo.NewTrain;
import com.usian.common.pojo.Train;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

@FeignClient(value = "day15-mapenghui-train")
public interface TrainFeign {

    @GetMapping("/train/getTrainCounts/{userId}")
    Train getTrainCounts(@PathVariable(value = "userId") Integer userId);

    @GetMapping("/train/getNewestTrain")
    List<NewTrain> getNewestTrain();

}
